COM AT+CMGL - List SMS
COM Version 1.0		03.01.05	T. Kleinmann

COM Change Preferred message storage to mobile first
AT+CPMS="ME"
WAIT FOR OK

COM Test
AT+CMGL=?
WAIT FOR OK

COM Write without parameter
AT+CMGL
WAIT FOR OK

COM 0: REC UNREAD 	(received messages unread)
COM 1: REC READ    	(received messages read)
COM 2: STO UNSENT	(stored unsent messages)
COM 3: ALL		(all messages)

for i in range (0,5):
	AT+CMGL=i
	WAIT FOR OK
	WAIT 2000

COM Reset Preferred message storage to SIM
AT+CPMS="SM"
WAIT FOR OK

AT
WAIT FOR OK
